package com.hunan.api.catv.service.impl.comment;

import com.hunan.api.catv.dao.BaseDao;
import com.hunan.api.catv.dao.CommentDao;
import com.hunan.api.catv.entity.po.Comment;
import com.hunan.api.catv.entity.vo.CommentVo;
import com.hunan.api.catv.service.impl.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jiang zhuan
 * @version 1.0
 * @description 评论
 * @date 2020/9/22 0022
 * @package com.hunan.api.catv.service.impl.comment
 * @company 湖南有线
 */
@Service
public class CommentService extends CommonService<Comment, CommentVo, Long> {

    @Autowired
    private CommentDao commentDao;

    @Override
    public BaseDao<Comment, CommentVo, Long> getBaseDao() {
        return commentDao;
    }

    public List<CommentVo> getCommentList(String memberPhone, Integer answerId, String memberName, Integer state, String startTime, String endTime, String reviewStartTime, String reviewEndTime) {
        return commentDao.getCommentList(memberPhone, answerId, memberName, state, startTime, endTime, reviewStartTime, reviewEndTime);
    }

    public List<Long> listIdsExcludeFail(Comment comment) {
        return commentDao.selectlistIdsExcludeFail(comment);
    }

    public Integer countExcludeFail(Comment comment) {
        return commentDao.countExcludeFail(comment);
    }
}
